package com.PictureSite.DatabaseAccess;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import com.PictureSite.model.PictureSitePostModel;
import com.PictureSite.model.UserPost;
import com.PictureSite.model.Voter;
import com.google.appengine.api.datastore.Entity;
import com.google.appengine.api.datastore.EntityNotFoundException;

interface GenericDAO {
	
	void storePost(UserPost newPost);

	List<Entity> getPostByDateDesc(int pageLimit, int pageNumber);

	boolean isLastImagePage(int pageLimit, int pageNumber);

	Map<String, Object> getPostFromId(UserPost userPost) throws EntityNotFoundException;

	void storeVotes(UserPost userPost, Voter voter) throws Exception;

	List<String> getIpsForUserPost(String id) throws Exception;

	Boolean getVoters(String id, String ip) throws Exception;

	void changeVote(UserPost userPost, Voter voter, String type)
			throws Exception;

	Boolean getVoteType(String id);

	List<Entity> getTopFiveRatedPost();
	
}
